package tc.alert.tckejisoc.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * @TableName soc_banned
 */
@TableName(value = "soc_banned")
public class SocBanned {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 封禁名称
     */
    private String name;

    /**
     * 原始日志id
     */
    private String eventId;

    /**
     * 封禁的ip
     */
    private String ip;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 创建用户
     */
    private String createUser;

    /**
     * 封禁类型   1 waf  2 edr  3 ty
     */
    private Integer type;

    /**
     * 封禁周期   null 为永封
     */
    private String bannedTime;

    /**
     *
     */
    public Integer getId() {
        return id;
    }

    /**
     *
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 封禁名称
     */
    public String getName() {
        return name;
    }

    /**
     * 封禁名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 原始日志id
     */
    public String getEventId() {
        return eventId;
    }

    /**
     * 原始日志id
     */
    public void setEventId(String eventId) {
        this.eventId = eventId;
    }

    /**
     * 封禁的ip
     */
    public String getIp() {
        return ip;
    }

    /**
     * 封禁的ip
     */
    public void setIp(String ip) {
        this.ip = ip;
    }

    /**
     * 创建时间
     */
    public String getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    /**
     * 创建用户
     */
    public String getCreateUser() {
        return createUser;
    }

    /**
     * 创建用户
     */
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    /**
     * 封禁类型   1 waf  2 edr  3 ty
     */
    public Integer getType() {
        return type;
    }

    /**
     * 封禁类型   1 waf  2 edr  3 ty
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * 封禁周期   null 为永封
     */
    public String getBannedTime() {
        return bannedTime;
    }

    /**
     * 封禁周期   null 为永封
     */
    public void setBannedTime(String bannedTime) {
        this.bannedTime = bannedTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SocBanned other = (SocBanned) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
                && (this.getEventId() == null ? other.getEventId() == null : this.getEventId().equals(other.getEventId()))
                && (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
                && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
                && (this.getBannedTime() == null ? other.getBannedTime() == null : this.getBannedTime().equals(other.getBannedTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getEventId() == null) ? 0 : getEventId().hashCode());
        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getBannedTime() == null) ? 0 : getBannedTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", eventId=").append(eventId);
        sb.append(", ip=").append(ip);
        sb.append(", createTime=").append(createTime);
        sb.append(", createUser=").append(createUser);
        sb.append(", type=").append(type);
        sb.append(", bannedTime=").append(bannedTime);
        sb.append("]");
        return sb.toString();
    }
}